from django.db import models


# Create your models here.
# 用户信息库
class UserInfo(models.Model):
    username = models.CharField(max_length=32, verbose_name='用户名', null=True)
    password = models.CharField(max_length=256, verbose_name='密码', null=True)
    phone_number = models.CharField(max_length=32, verbose_name='手机号', null=True)
    email = models.EmailField(max_length=128, verbose_name='邮箱', null=True)
    danceType = models.CharField(max_length=32, verbose_name='舞种', null=True)


# 课程信息库
class Course(models.Model):
    course_name = models.CharField(max_length=32, verbose_name='课程名称', null=True)
    course_fengmian = models.ImageField(upload_to='fengmian', max_length=100, verbose_name='课程封面', null=True)
    course_imgName = models.CharField(max_length=256, verbose_name='封面名称', null=True)
    course_startDate = models.DateField(max_length=32, verbose_name='课程开始时间', null=True)
    course_endDate = models.DateField(max_length=32, verbose_name='课程结束时间', null=True)
    course_teacher = models.CharField(max_length=16, verbose_name='老师', null=True)
    course_status = models.CharField(max_length=16, verbose_name='开课状态', null=True)


# 少儿课程信息库
class KidCourse(models.Model):
    course_name = models.CharField(max_length=32, verbose_name='课程名称', null=True)
    course_fengmian = models.ImageField(upload_to='fengmian', max_length=100, verbose_name='课程封面', null=True)
    course_imgName = models.CharField(max_length=256, verbose_name='封面名称', null=True)
    course_startDate = models.DateField(max_length=32, verbose_name='课程开始时间', null=True)
    course_endDate = models.DateField(max_length=32, verbose_name='课程结束时间', null=True)
    course_teacher = models.CharField(max_length=16, verbose_name='老师', null=True)
    course_status = models.CharField(max_length=16, verbose_name='开课状态', null=True)


# 视频库
class PoppingVideo(models.Model):
    video_path = models.FilePathField(max_length=256, verbose_name='视频路径')
    video_img = models.ImageField(max_length=256, verbose_name='视频封面')
    video_title = models.CharField(max_length=64, verbose_name='视频标题')
    like_number = models.IntegerField(verbose_name='点赞数', null=True, default=0)
    collect_number = models.IntegerField(verbose_name='收藏数', null=True, default=0)
    video_view = models.IntegerField(verbose_name='播放量', null=True, default=0)
    forward_number = models.IntegerField(verbose_name='转发数', null=True, default=0)


# 工作室信息库
class StudioInfo(models.Model):
    studio_name = models.CharField(max_length=32, verbose_name='工作室名', null=True)
    studio_img = models.ImageField(max_length=256, verbose_name='工作室封面')
    studio_location = models.CharField(max_length=256, verbose_name='工作室地区')
    studio_position = models.CharField(max_length=128,verbose_name='详细地址', null=True)
    studio_openTime = models.CharField(max_length=64, verbose_name='营业时间')
    studio_courseTable = models.ImageField(max_length=128, verbose_name='课程表')


# 工作室成员信息库
class StudioMember(models.Model):
    studio_member = models.CharField(max_length=32, verbose_name='工作室老师')
    studio_memberImg = models.ImageField(max_length=256, verbose_name='工作室老师照片')
    studio_memberDesc = models.CharField(max_length=256, verbose_name='老师简介')
    studio_belong = models.CharField(max_length=32, verbose_name='所属工作室')


# 工作室视频库
class StudioVideo(models.Model):
    studioVideo_path = models.FilePathField(max_length=256, verbose_name='工作室视频')
    studioVideo_img = models.ImageField(max_length=128, verbose_name='工作室视频封面')
    studioVideo_title = models.CharField(max_length=64,verbose_name='工作室视频标题')
    studioVideo_belong = models.CharField(max_length=32, verbose_name='所属工作室')


# 赛事库
class Match(models.Model):
    match_name = models.CharField(max_length=64, verbose_name='赛事名称')
    match_desc = models.CharField(max_length=512, verbose_name='赛事详情')
    match_img = models.ImageField(max_length=128, verbose_name='赛事封面')
    match_time = models.CharField(max_length=64, verbose_name='赛事区间')
    application_time = models.CharField(max_length=64, verbose_name='报名区间')


# 点赞表
class VideoLike(models.Model):
    user_name = models.CharField(max_length=64, verbose_name='用户名')
    video_id = models.CharField(max_length=16, verbose_name='视频主键')
    like_status = models.CharField(max_length=16, verbose_name='点赞状态', null=True)


# 收藏表
class VideoCollect(models.Model):
    username = models.CharField(max_length=64, verbose_name='用户名')
    video_id = models.CharField(max_length=16, verbose_name='视频主键')
    collect_status = models.CharField(max_length=16, verbose_name='收藏状态')